При работе со временем и датами у встроенных модулей есть несколько неприятных моментов:
— Их слишком много: datetime, time, calendar, dateutil, pytz и другие; — В них слишком много типов: date, time, datetime, tzinfo, timedelta, relativedelta и т. д.
И вот на днях я наткнулся на пакет arrow, который их решает. Во-первых, там есть все необходимое. Во-вторых, все объекты имеют один и тот же тип Arrow.
Большой плюс в том, что пакет совместим с основными встроенными типами. Например, выше я преобразовал datetime в Arrow и обратно.
Еще из приятных бонусов: там есть функция humanize, которая конвертирует время в читаемый текст.
При работе со временем и датами у встроенных модулей есть несколько неприятных моментов:
— Их слишком много: datetime, time, calendar, dateutil, pytz и другие; — В них слишком много типов: date, time, datetime, tzinfo, timedelta, relativedelta и т. д.
И вот на днях я наткнулся на пакет arrow, который их решает. Во-первых, там есть все необходимое. Во-вторых, все объекты имеют один и тот же тип Arrow.
Большой плюс в том, что пакет совместим с основными встроенными типами. Например, выше я преобразовал datetime в Arrow и обратно.
Еще из приятных бонусов: там есть функция humanize, которая конвертирует время в читаемый текст.
A leaked Telegram discussion by 50 so-called crypto influencers has exposed the extraordinary steps they take in order to profit on the back off unsuspecting defi investors. According to a leaked screenshot of the chat, an elaborate plan to defraud defi investors using the worthless “$Few” tokens had been hatched. $Few tokens would be airdropped to some of the influencers who in turn promoted these to unsuspecting followers on Twitter.
To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.